import request from '@/utils/request'

// 查询采购列表
export function listProcure(query) {
  return request({
    url: '/function/procure/listPage',
    method: 'get',
    params: query
  })
}


// 查询采购详情
export function getProcure(id) {
  return request({
    url: '/function/procure/' + id,
    method: 'get'
  })
}

// 新增采购
export function addProcure(data) {
  return request({
    url: '/function/procure',
    method: 'post',
    data: data
  })
}

// 修改采购
export function updateProcure(data) {
  return request({
    url: '/function/procure',
    method: 'put',
    data: data
  })
}

// 删除采购
export function delProcure(id) {
  return request({
    url: '/function/procure/' + id,
    method: 'delete'
  })
}

// 审核采购
export function checkProcure(data) {
  return request({
    url: '/function/procure/audit',
    method: 'post',
    data: data
  })
}
// 导出采购项模板
export function exportP(data) {
  return request({
    url: '/function/procureItem/export/template',
    method: 'post',
    data: data
  })
}
// 导入采购项
export function importP(data) {
  return request({
    url: '/function/procureItem/importData',
    method: 'post',
    data: data
  })
}
// 获取报价项
export function getQuotation(id) {
  return request({
    url: '/function/quotation/quotationList/'+id,
    method: 'get'
  })
}
// 获取产品分类
// export function getProduct() {
//   return request({
//     url: '/product/category/categoryTypeList',
//     method: 'get'
//   })
// }
// 获取产品分类
export function getProduct() {
  return request({
    url: '/product/category/typeCategoryList',
    method: 'get'
  })
}